package com.example.mapper;

import com.example.pojo.OutputEcharts;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
public interface OutputMapper {
    @Select("select output_m.materialID as mid,sum(total) as total,materials.materialName as name from output_m INNER JOIN materials ON output_m.materialID = materials.materialID group by output_m.materialID")
    List<OutputEcharts> outout_m();
    @Select("select output_m.materialID as mid,sum(total) as total,materials.materialName as name from output_m INNER JOIN materials ON output_m.materialID = materials.materialID group by output_m.materialID,output_m.date HAVING output_m.date = #{localDate}")
    List<OutputEcharts> outout_m1(LocalDate localDate);
}
